home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / Libraries / SpriteEngine / SE Random / SpriteHandlers.h < prev   
Text File  |  1995-03-11  |  859b  |  34 lines

  1. /* Application-dependent definitions */
  2.  
  3. /* All the possible kinds of game entities */
  4. /* Add new types as necessary */
  5. typedef enum
  6. {
  7.     randomPositionSprite,
  8.     randomSpeedSprite,
  9.     randomImpulseSprite,
  10.     changeSometimesSprite
  11. } EntityType;
  12.  
  13.  
  14. /* Data structure describing a sprite*/
  15. /* Add new fields as necessary */
  16.  
  17. /**/
  18.  
  19. typedef struct SpriteRecord {
  20. /*Game entity data - edit as desired*/
  21.     EntityType        kind;                /* What kind? */
  22.     Point            speed;                /*  */
  23.     Point            fixedPointPosition;
  24. /*Sprite data - don't remove*/
  25.     Point            position;            /* Integer screen coordinates! */
  26.     GrafPtr            face;                /* Apprearance of the sprite */
  27.     Rect            drawingRect;        /* Where is it? */
  28. /*List pointers - don't remove*/
  29.     struct SpriteRecord    *prev, *next;        /* Next enity in the list */
  30. } SpriteRecord;
  31.  
  32. // Decomment this if fixedPointPosition is declared below!
  33. #define    _hasfixedpoint
  34.